//
//  MyPublic_view.m
//  MZJ
//
//  Created by XDD on 16/6/16.
//  Copyright © 2016年 XDD. All rights reserved.
//

#import "MyPublic_view.h"

@interface MyPublic_view () <UIScrollViewDelegate,UITextFieldDelegate> {
    
    NSTimer *timer_;
    BOOL isFromStart_;
    UIPageControl *pageControl_;
}

@end

@implementation MyPublic_view

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self initializeView];
    }
    return self;
}

- (void)initializeView {
    
    //    CGFloat size = 0.0;
    //    if (kHeight == 480) {
    //        size = 11.0;
    //    }
    //    if (kHeight == 568) {
    //        size = 12.0;
    //    }
    //    if (kHeight == 667) {
    //        size = 13.0;
    //    }
    //    if (kHeight == 736) {
    //        size = 14.0;
    //    }
    

    
    _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 55, kWidth, kHeight - 55)];
    _scrollView.backgroundColor = [UIColor whiteColor];
    [_scrollView setContentSize:CGSizeMake(kWidth, 1180)];
    _scrollView.delegate = self;
    _scrollView.scrollEnabled = YES;
    _scrollView.userInteractionEnabled = YES;
    _scrollView.showsHorizontalScrollIndicator = YES;
    //    scrollView.showsVerticalScrollIndicator = NO;
    //    scrollView. pagingEnabled=YES;
    [self addSubview:_scrollView];
    
    UILabel *promptLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 5, kWidth, 35)];
    promptLabel.text = @"填写需要帮助人的资料";
    promptLabel.textAlignment = NSTextAlignmentCenter;
    promptLabel.backgroundColor = [UIColor colorWithRed:215/255.0 green:215/255.0 blue:215/255.0 alpha:1];
    promptLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:promptLabel];
    
    UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(10, 51, 3, 13)];
    view1.backgroundColor = [UIColor blueColor];
    [_scrollView addSubview:view1];
    
    UILabel *baseDataLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 45, 100, 25)];
    baseDataLabel.text = @"基本资料";
    baseDataLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    baseDataLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:baseDataLabel];
    
    //真实姓名
    UILabel *nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 90, 100, 25)];
    nameLabel.text = @"真实姓名";
    nameLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    nameLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:nameLabel];
    
    _nameTextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 99, kWidth - 105 - 20, 20)];
//    _nameTextField.backgroundColor = [UIColor redColor];
    _nameTextField.font = [UIFont systemFontOfSize:12];
    _nameTextField.placeholder = @"请输入真实姓名...";
    [_scrollView addSubview:_nameTextField];
    
    UIView *lines1 = [[UIView alloc]initWithFrame:CGRectMake(100, 120, kWidth - 105, 1)];
    lines1.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines1];
    
    //性别
    UILabel *sexLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 135, 100, 25)];
    sexLabel.text = @"性别";
    sexLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    sexLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:sexLabel];
    
    UIButton *chooseBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    chooseBtn.frame = CGRectMake(100, 140, 40, 20);
    //    chooseBtn.backgroundColor = [UIColor yellowColor];
    [chooseBtn addTarget:self action:@selector(chooseBtnAction) forControlEvents:UIControlEventTouchUpInside];
    [_scrollView addSubview:chooseBtn];
    
    _chooseImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    chooseImageView.backgroundColor = [UIColor greenColor];
    _chooseImageView.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    
    [chooseBtn addSubview:_chooseImageView];
    
    UILabel *chooseLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 2, 16, 16)];
    chooseLabel.text = @"男";
    chooseLabel.font = [UIFont systemFontOfSize:13];
    [chooseBtn addSubview:chooseLabel];
    
    UIButton *chooseBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    chooseBtn1.frame = CGRectMake(205, 140, 40, 20);
    //    chooseBtn1.backgroundColor = [UIColor yellowColor];
    [chooseBtn1 addTarget:self action:@selector(chooseBtn1Action) forControlEvents:UIControlEventTouchUpInside];
    [_scrollView addSubview:chooseBtn1];
    
    _chooseImageView1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    chooseImageView1.backgroundColor = [UIColor greenColor];
    _chooseImageView1.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [chooseBtn1 addSubview:_chooseImageView1];
    
    UILabel *chooseLabel1 = [[UILabel alloc]initWithFrame:CGRectMake(20, 2, 16, 16)];
    chooseLabel1.text = @"女";
    chooseLabel1.font = [UIFont systemFontOfSize:13];
    [chooseBtn1 addSubview:chooseLabel1];
    
    //年龄
    UILabel *ageLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 180, 100, 25)];
    ageLabel.text = @"年龄";
    ageLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    ageLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:ageLabel];
    
    UIView *lines2 = [[UIView alloc]initWithFrame:CGRectMake(100, 200, kWidth - 105, 1)];
    lines2.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines2];
    
    _ageTextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 179, kWidth - 105 - 20, 20)];
//    _ageTextField.backgroundColor = [UIColor redColor];
    _ageTextField.font = [UIFont systemFontOfSize:12];
    _ageTextField.placeholder = @"请输入年龄...";
    _ageTextField.keyboardType = UIKeyboardTypeNumberPad;
    [_scrollView addSubview:_ageTextField];
    
    //身份证号码
    UILabel *idCardLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 225, 100, 25)];
    idCardLabel.text = @"身份证号码";
    idCardLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    idCardLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:idCardLabel];
    
    _idCardTextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 224, kWidth - 105 - 20, 20)];
//    _idCardTextField.backgroundColor = [UIColor redColor];
    _idCardTextField.font = [UIFont systemFontOfSize:12];
    _idCardTextField.placeholder = @"请输入身份证号码...";
    _idCardTextField.keyboardType = UIKeyboardTypeURL;
    [_scrollView addSubview:_idCardTextField];
    
    //家庭人口
    UILabel *person_Num_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 270, 100, 25)];
    person_Num_Label.text = @"家庭人口";
    person_Num_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    person_Num_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:person_Num_Label];
    
    UIView *lines3 = [[UIView alloc]initWithFrame:CGRectMake(100, 245, kWidth - 105, 1)];
    lines3.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines3];
    
    _person_Num_TextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 269, kWidth - 105 - 20, 20)];
//    _person_Num_TextField.backgroundColor = [UIColor redColor];
    _person_Num_TextField.font = [UIFont systemFontOfSize:12];
    _person_Num_TextField.placeholder = @"请输入家庭人口...";
    [_scrollView addSubview:_person_Num_TextField];
    
    //联系方式
    UILabel *phoneNum_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 315, 100, 25)];
    phoneNum_Label.text = @"联系方式";
    phoneNum_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    phoneNum_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:phoneNum_Label];
    
    UIView *lines4 = [[UIView alloc]initWithFrame:CGRectMake(100, 290, kWidth - 105, 1)];
    lines4.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines4];
    
    _phoneNum_TextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 314, kWidth - 105 - 20, 20)];
//    _phoneNum_TextField.backgroundColor = [UIColor redColor];
    _phoneNum_TextField.font = [UIFont systemFontOfSize:12];
    _phoneNum_TextField.placeholder = @"请输入联系方式...";
    _phoneNum_TextField.keyboardType = UIKeyboardTypeNumberPad;
    [_scrollView addSubview:_phoneNum_TextField];
    
    //家庭地址
    UILabel *home_address_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 360, 100, 25)];
    home_address_Label.text = @"家庭地址";
    home_address_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    home_address_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:home_address_Label];
    
    UIView *lines5 = [[UIView alloc]initWithFrame:CGRectMake(100, 335, kWidth - 105, 1)];
    lines5.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines5];
    
    UIView *lines6 = [[UIView alloc]initWithFrame:CGRectMake(100, 380, kWidth - 105, 1)];
    lines6.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines6];
    
    _home_address_TextField = [[UITextField alloc]initWithFrame:CGRectMake(170, 359, kWidth - 105 - 20 - 60, 20)];
//    _home_address_TextField.backgroundColor = [UIColor redColor];
    _home_address_TextField.keyboardType = UIReturnKeyGo;
    _home_address_TextField.font = [UIFont systemFontOfSize:12];
    _home_address_TextField.placeholder = @"请输入详细地址...";
    [_scrollView addSubview:_home_address_TextField];
    
    UIView *lines10 = [[UIView alloc]initWithFrame:CGRectMake(163, 360, 2, 18)];
    lines10.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines10];
    
    _chooseDown_TextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 359, 58, 20)];
//    _chooseDown_TextField.backgroundColor = [UIColor blueColor];
    _chooseDown_TextField.placeholder = @"选择镇名";
    _chooseDown_TextField.delegate = self;
    _chooseDown_TextField.textAlignment = NSTextAlignmentCenter;
    _chooseDown_TextField.font = [UIFont systemFontOfSize:12];
//    _chooseDown_TextField.keyboardType = UIReturnKeyGo;
    [_scrollView addSubview:_chooseDown_TextField];
    
    //需求描述
    UIView *view2 = [[UIView alloc]initWithFrame:CGRectMake(10, 427, 3, 13)];
    view2.backgroundColor = [UIColor blueColor];
    [_scrollView addSubview:view2];
    
    UILabel *requirementLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 420, 100, 25)];
    requirementLabel.text = @"需求描述";
    requirementLabel.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    requirementLabel.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:requirementLabel];
    
    //需求标题
    UILabel *title_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 465, 100, 25)];
    title_Label.text = @"需求标题";
    title_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    title_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:title_Label];
    
    UIView *lines7 = [[UIView alloc]initWithFrame:CGRectMake(100, 485, kWidth - 105, 1)];
    lines7.backgroundColor = [UIColor grayColor];
    [_scrollView addSubview:lines7];
    
    _title_TextField = [[UITextField alloc]initWithFrame:CGRectMake(105, 464, kWidth - 105 - 20, 20)];
//    _title_TextField.backgroundColor = [UIColor redColor];
    _title_TextField.font = [UIFont systemFontOfSize:12];
    _title_TextField.placeholder = @"请输入标题...";
    [_scrollView addSubview:_title_TextField];
    
    //描述详情
    UILabel *detail_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 510, 100, 25)];
    detail_Label.text = @"描述详情";
    detail_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    detail_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:detail_Label];
    
    _requirement_textView = [[UITextView alloc]initWithFrame:CGRectMake(20, 540, kWidth - 40, 200)];
    _requirement_textView.backgroundColor = [UIColor grayColor];
    _requirement_textView.font = [UIFont systemFontOfSize:12];
    [_scrollView addSubview:_requirement_textView];
    
    //添加图片
    UILabel *photo_Updata_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 760, 100, 25)];
    photo_Updata_Label.text = @"添加图片";
    photo_Updata_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    photo_Updata_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:photo_Updata_Label];
    
    //困难类型
    _type_view = [[UIView alloc]initWithFrame:CGRectMake(5, 910, kWidth - 10, 100)];
    //    _type_view.backgroundColor = [UIColor greenColor];
    [_scrollView addSubview:_type_view];
    
    UIView *view4 = [[UIView alloc]initWithFrame:CGRectMake(5, 7, 3, 12)];
    view4.backgroundColor = [UIColor blueColor];
    [_type_view addSubview:view4];
    
    UILabel *type_Label = [[UILabel alloc]initWithFrame:CGRectMake(13, 0, 100, 25)];
    type_Label.text = @"困难类型";
    type_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    type_Label.font = [UIFont systemFontOfSize:13];
    [_type_view addSubview:type_Label];
    
    
    UIButton *typeBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    typeBtn1.frame = CGRectMake(13, 40, (_type_view.frame.size.width - 96)/3, 20);
    //    typeBtn1.backgroundColor = [UIColor yellowColor];
    [typeBtn1 addTarget:self action:@selector(typeBtn1Action) forControlEvents:UIControlEventTouchUpInside];
    [_type_view addSubview:typeBtn1];
    
    _typeimageView1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    typeimageView1.backgroundColor = [UIColor purpleColor];
    _typeimageView1.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [typeBtn1 addSubview:_typeimageView1];
    
    UILabel *typeLabel1 = [[UILabel alloc]initWithFrame:CGRectMake(18, 2, typeBtn1.frame.size.width - 20, 16)];
    typeLabel1.text = @"因病致贫";
    typeLabel1.font = [UIFont systemFontOfSize:12];
    [typeBtn1 addSubview:typeLabel1];
    
    UIButton *typeBtn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    typeBtn2.frame = CGRectMake(13 + (_type_view.frame.size.width - 96)/3 + 35, 40, (_type_view.frame.size.width - 96)/3, 20);
    //    typeBtn2.backgroundColor = [UIColor yellowColor];
    [typeBtn2 addTarget:self action:@selector(typeBtn2Action) forControlEvents:UIControlEventTouchUpInside];
    [_type_view addSubview:typeBtn2];
    
    _typeimageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    typeimageView2.backgroundColor = [UIColor purpleColor];
    _typeimageView2.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [typeBtn2 addSubview:_typeimageView2];
    
    UILabel *typeLabel2 = [[UILabel alloc]initWithFrame:CGRectMake(18, 2, typeBtn2.frame.size.width - 20, 16)];
    typeLabel2.text = @"因残致贫";
    typeLabel2.font = [UIFont systemFontOfSize:12];
    [typeBtn2 addSubview:typeLabel2];
    
    UIButton *typeBtn3 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    typeBtn3.frame = CGRectMake(13 + (_type_view.frame.size.width - 96)*2/3 + 70, 40, (_type_view.frame.size.width - 96)/3, 20);
    //    typeBtn3.backgroundColor = [UIColor yellowColor];
    [typeBtn3 addTarget:self action:@selector(typeBtn3Action) forControlEvents:UIControlEventTouchUpInside];
    [_type_view addSubview:typeBtn3];
    
    _typeimageView3 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    typeimageView3.backgroundColor = [UIColor purpleColor];
    _typeimageView3.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [typeBtn3 addSubview:_typeimageView3];
    
    UILabel *typeLabel3 = [[UILabel alloc]initWithFrame:CGRectMake(18, 2, typeBtn3.frame.size.width - 20, 16)];
    typeLabel3.text = @"因学致贫";
    typeLabel3.font = [UIFont systemFontOfSize:12];
    [typeBtn3 addSubview:typeLabel3];
    
    UIButton *typeBtn4 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    typeBtn4.frame = CGRectMake(13, 75, (_type_view.frame.size.width - 96)/3, 20);
    //    typeBtn4.backgroundColor = [UIColor yellowColor];
    [typeBtn4 addTarget:self action:@selector(typeBtn4Action) forControlEvents:UIControlEventTouchUpInside];
    [_type_view addSubview:typeBtn4];
    
    _typeimageView4 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    typeimageView4.backgroundColor = [UIColor purpleColor];
    _typeimageView4.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [typeBtn4 addSubview:_typeimageView4];
    
    UILabel *typeLabel4 = [[UILabel alloc]initWithFrame:CGRectMake(18, 2, typeBtn4.frame.size.width - 20, 16)];
    typeLabel4.text = @"因祸致贫";
    typeLabel4.font = [UIFont systemFontOfSize:12];
    [typeBtn4 addSubview:typeLabel4];
    
    UIButton *typeBtn5 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    typeBtn5.frame = CGRectMake(13 + (_type_view.frame.size.width - 96)/3 + 35, 75, (_type_view.frame.size.width - 96)/3 + 20, 20);
    //    typeBtn5.backgroundColor = [UIColor yellowColor];
    [typeBtn5 addTarget:self action:@selector(typeBtn5Action) forControlEvents:UIControlEventTouchUpInside];
    [_type_view addSubview:typeBtn5];
    
    _typeimageView5 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    typeimageView5.backgroundColor = [UIColor purpleColor];
    _typeimageView5.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [typeBtn5 addSubview:_typeimageView5];
    
    UILabel *typeLabel5 = [[UILabel alloc]initWithFrame:CGRectMake(18, 2, typeBtn5.frame.size.width, 16)];
    typeLabel5.text = @"其他特殊情况";
    typeLabel5.font = [UIFont systemFontOfSize:12];
    [typeBtn5 addSubview:typeLabel5];
    
    //需求详情
    _view3 = [[UIView alloc]initWithFrame:CGRectMake(10, 1027, 3, 13)];
    _view3.backgroundColor = [UIColor blueColor];
    [_scrollView addSubview:_view3];
    
    _require_detail_Label = [[UILabel alloc]initWithFrame:CGRectMake(18, 1020, 100, 25)];
    _require_detail_Label.text = @"需求详情";
    _require_detail_Label.textAlignment = NSTextAlignmentLeft;
    //    baseDataLabel.backgroundColor = [UIColor redColor];
    _require_detail_Label.font = [UIFont systemFontOfSize:13];
    [_scrollView addSubview:_require_detail_Label];
    
    //资金
    _fundBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _fundBtn.frame = CGRectMake(18, 1075, 50, 20);
    //    _fundBtn.backgroundColor = [UIColor yellowColor];
    [_fundBtn addTarget:self action:@selector(fundBtnAction) forControlEvents:UIControlEventTouchUpInside];
    [_scrollView addSubview:_fundBtn];
    
    _fundimageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    fundimageView.backgroundColor = [UIColor greenColor];
    _fundimageView.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [_fundBtn addSubview:_fundimageView];
    
    UILabel *fundLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 2, 30, 16)];
    fundLabel.text = @"资金";
    fundLabel.font = [UIFont systemFontOfSize:13];
    [_fundBtn addSubview:fundLabel];
    
    _money_Label = [[UILabel alloc]initWithFrame:CGRectMake(120, 1075, 30, 25)];
    _money_Label.text = @"金额";
    _money_Label.font = [UIFont systemFontOfSize:13];
    _money_Label.textAlignment = NSTextAlignmentCenter;
    [_scrollView addSubview:_money_Label];
    
    _money_textField = [[UITextField alloc]initWithFrame:CGRectMake(158, 1080, kWidth - 158 - 20, 15)];
    _money_textField.layer.borderWidth = 1.0;
    _money_textField.font = [UIFont systemFontOfSize:10];
    _money_textField.placeholder = @"请输入需求金额...";
    [_money_textField setReturnKeyType:UIReturnKeyDone];
    _money_textField.layer.borderColor = [[UIColor grayColor] CGColor];
    [_scrollView addSubview:_money_textField];
    
    //物资
    _goodsBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _goodsBtn.frame = CGRectMake(18, 1115, 50, 20);
    //    _goodsBtn.backgroundColor = [UIColor yellowColor];
    [_goodsBtn addTarget:self action:@selector(goodsBtnAction) forControlEvents:UIControlEventTouchUpInside];
    [_scrollView addSubview:_goodsBtn];
    
    _goodsimageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 5, 12, 12)];
    //    goodsimageView.backgroundColor = [UIColor greenColor];
    _goodsimageView.image = [UIImage imageNamed:@"Checked-NO_img@2x"];
    [_goodsBtn addSubview:_goodsimageView];
    
    UILabel *goodsLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 2, 30, 16)];
    goodsLabel.text = @"物资";
    goodsLabel.font = [UIFont systemFontOfSize:13];
    [_goodsBtn addSubview:goodsLabel];
    
    _remarks_Label = [[UILabel alloc]initWithFrame:CGRectMake(120, 1115, 30, 25)];
    _remarks_Label.text = @"备注";
    _remarks_Label.font = [UIFont systemFontOfSize:13];
    _remarks_Label.textAlignment = NSTextAlignmentCenter;
    [_scrollView addSubview:_remarks_Label];
    
    _remarks_textField = [[UITextField alloc]initWithFrame:CGRectMake(158, 1120, kWidth - 158 - 20, 15)];
    _remarks_textField.layer.borderWidth = 1.0;
    _remarks_textField.font = [UIFont systemFontOfSize:10];
    _remarks_textField.placeholder = @"请输入需求物资等...";
    _remarks_textField.layer.borderColor = [[UIColor grayColor] CGColor];
    [_scrollView addSubview:_remarks_textField];
    
}


- (void)chooseBtnAction {
    if (self.didsexBtn_manBlock) {
        self.didsexBtn_manBlock();
    }
}

-(void)chooseBtn1Action {
    if (self.didsexBtn_woManBlock) {
        self.didsexBtn_woManBlock();
    }
}

- (void)typeBtn1Action {
    if (self.didtype_btn1Block) {
        self.didtype_btn1Block();
    }
}

- (void)typeBtn2Action {
    if (self.didtype_btn2Block) {
        self.didtype_btn2Block();
    }
}
- (void)typeBtn3Action {
    if (self.didtype_btn3Block) {
        self.didtype_btn3Block();
    }
}
- (void)typeBtn4Action {
    if (self.didtype_btn4Block) {
        self.didtype_btn4Block();
    }
}
- (void)typeBtn5Action {
    if (self.didtype_btn5Block) {
        self.didtype_btn5Block();
    }
}
//资金
- (void)fundBtnAction {
    if (self.didfundBtnBlock) {
        self.didfundBtnBlock();
    }
}

//物资
- (void)goodsBtnAction {
    if (self.didgoodsBtnBlock) {
        self.didgoodsBtnBlock();
    }
}

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
    //写你要实现的：页面跳转的相关代码
    if (self.diddown_chooseBtnBlock) {
        self.diddown_chooseBtnBlock();
    }
    return NO;
}

@end











